﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
using OrderManagementSystem;


namespace assignment6
{
    public partial class AddDetail : Form
    {

        public OrderDetails detail = new OrderDetails { };

        public AddDetail()
        {
            InitializeComponent();
        }

        private void btnDetailOk_Click(object sender, EventArgs e)
        {
            detail.ProductName = $"{txtDetailName.Text}";
            detail.Quantity = int.Parse(txtDetailPiece.Text);
            detail.Price = decimal.Parse(txtDetailPrice.Text);
            this.DialogResult = DialogResult.OK;
        }

        private void txtDetailPrice_TextChanged(object sender, EventArgs e)
        {

        }
    }
}
